from django import forms
from content.models import SeekingAd

class CommentForm(forms.Form):
    name = forms.CharField(label='Name', max_length=100)
    comment = forms.CharField(label='Comment', widget=forms.Textarea(
        attrs={"rows": "6", "cols": "50"}
    ))

class SeekingAdForm(forms.ModelForm):
    class Meta:
        model = SeekingAd
        fields = ['content', 'seeking', 'musician', 'band', ]

    def __init__(self, *args, **kwargs):
        super().__init__(*args, **kwargs)
        self.fields['seeking'].label = "I am seeking a"
        self.fields['musician'].help_text = "Fill in if you are a musician seeking a band"
        self.fields['band'].help_text = "Fill in if you are a band seeking a musician"